<template>
  <div>
    <input type="text" v-model="use.name">
    <input type="text" v-model="user.age">
  </div>
</template>

<script>
export default {
  data () {
    return {
     user: {
        name: "小白",
        age: 0
      }
    }
  },
  watch:{
   user:{
      handler(newVal,oldVal){
      console.log(newVal,oldVal)
   },
   deep:true,
   immediate:true
  },
}
}
</script>

<style>

</style>